package org.howie.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.howie.domain.User;
import org.howie.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : Howie.Lyu
 * @date : 2023/10/19 15:05
 */

@RestController
public class TestController {

    @Autowired
    UserService userService;

    @GetMapping("/test")
    public User test(){
        QueryWrapper<User> userQueryWrapper = new QueryWrapper<>();
        userQueryWrapper.eq("id",1);
        User user = userService.getOne(userQueryWrapper);
        return user;
    }
}
